package com.tuozixuan.easyexcel;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.excel.support.ExcelTypeEnum;

public class EasyExcelReadDemo {

	public static void main(String[] args) {
	    
	    EasyExcel.read("用戶信息表" + ExcelTypeEnum.XLSX.getValue(), User.class, new AnalysisEventListener<User>() {

			@Override
			public void invoke(User data, AnalysisContext context) {
				System.out.println("读取:" + data.getName());
			}

			@Override
			public void doAfterAllAnalysed(AnalysisContext context) {
				 System.out.println("读取完成");
			}}).sheet().doRead();
	    
	}

}
